<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<div id="loadDiv" style="text-align: center;margin-top: 20px;">
	<img src="/comm-schedule-server/commons/images/flow/loading.gif" alt="数据处理中..." />
	<br/><br/><div id="showStatusContent"></div>
</div>
<script type="text/javascript">
var content;
var taskResult;
if(taskStatus == 0) {
	content = '任务在启动中...';
	taskResult = '任务启动';
} else {
	content = '任务在停止中...';
	taskResult = '任务停止';
}
$('#showStatusContent').html(content);
$.ajax({
	type: "get",
	timeout:20000,
	url: '/comm-schedule-server/task/changeTaskStatus/' + taskId + '/' + taskStatus,
	success: function(data,res){
		if(data.success == true){
			$('#firstLevelDialog').dialog('close');
			$.messager.alert('提示',taskResult + '成功','info',function(){$('#'+paramObj.tableId).datagrid('reload');});
		} else {
			$.messager.alert('提示',taskResult + '出现了异常：' + data.errorMsg,'error');
		}
	},
	error: function(res){
		$.messager.alert('提示',i18n.requestError,'error');
	}
});
</script>